home *** CD-ROM | disk | FTP | other *** search
/ Mac Expert 1995 Winter / Mac Expert - Winter 95.iso / Les fichiers / Communications / AppleTalk Remote access / Scripts ARA ƒ / Hayes V-Series 9600 / Hayes V-Series 9600
Encoding:
Text File  |  1991-12-17  |  3.0 KB  |  195 lines  |  [mlts/slnk]

  1. ! "Hayes V-Series 9600 - 11/14/91"
  2. @ORIGINATE
  3. @ANSWER
  4. !
  5. @LABEL 1
  6. serreset 19200, 0, 8, 1
  7. HSReset 0 1 0 0 0 0
  8. !
  9. ! first recall the factory configuration
  10. !
  11. matchclr
  12. settries 0
  13. matchstr 1 3 "OK\13\10"
  14. @LABEL 2
  15. write "AT&F\13"
  16. matchread 30
  17. inctries
  18. iftries 2 59
  19. jump 2
  20. !
  21. ! Next, Set carrier timing, echo off, set flow control
  22. !
  23. @LABEL 3
  24. matchstr 1 4 "OK\13\10"
  25. write "ATS7=60S10=100E0&K3\13"
  26. matchread 30
  27. jump 59
  28. !
  29. ! Next, set DTR to ignore
  30. !
  31. @LABEL 4
  32. matchstr 1 5 "OK\13\10"
  33. matchstr 2 5 "ERROR\13\10"
  34. write "AT&D0\13"
  35. matchread 30
  36. !
  37. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  38. @LABEL 5
  39. matchclr
  40. ifstr 2 8 "1"
  41. matchstr 1 8 "OK\13\10"
  42. write "ATM0\13"
  43. matchread 30
  44. jump 59
  45. !
  46. ! The modem is ready.  So enable answering, or originate a call
  47. !
  48. @LABEL 8
  49. ifANSWER 30
  50. note "Dialing ^1" 3
  51. write "ATS0=0DT^1\13"
  52. !
  53. @LABEL 9
  54. matchstr  1 11 "CONNECT 1200\13\10"
  55. matchstr  2 12 "CONNECT 2400\13\10"
  56. matchstr  3 13 "CONNECT 4800\13\10"
  57. matchstr  4 14 "CONNECT 9600\13\10"
  58. matchstr  5 15 "CONNECT 19200\13\10"
  59. matchstr  6 50 "NO CARRIER\13\10"
  60. matchstr  7 50 "ERROR\13\10"
  61. matchstr  8 52 "NO DIALTONE\13\10"
  62. matchstr  9 53 "BUSY\13\10"
  63. matchstr 10 54 "NO ANSWER\13\10"
  64. matchread 700
  65. jump 59
  66. !
  67. @LABEL 11
  68. note "Communicating at 1200 bps." 2
  69. serreset 1200, 0, 8, 1
  70. jump 16
  71. !
  72. @LABEL 12
  73. note "Communicating at 2400 bps." 2
  74. serreset 2400, 0, 8, 1
  75. jump 16
  76. !
  77. @LABEL 13
  78. note "Communicating at 4800 bps." 2
  79. serreset 4800, 0, 8, 1
  80. jump 16
  81. !
  82. @LABEL 14
  83. note "Communicating at 9600 bps." 2
  84. serreset 9600, 0, 8, 1
  85. jump 16
  86. !
  87. @LABEL 15
  88. note "Communicating at 19.2 kbps." 2
  89. serreset 19200, 0, 8, 1
  90. !
  91. @LABEL 16
  92. ifANSWER 17
  93. pause 30
  94. @LABEL 17
  95. exit 0
  96. !
  97. ! @ANSWER
  98. ! Set up the modem to answer on 2nd ring
  99. @LABEL 30
  100. write "ATS0=2\13"
  101. matchstr 1 31 "OK\13\10"
  102. matchread 30
  103. jump 59
  104. !
  105. @LABEL 31
  106. matchstr 1  32 "RING\13\10"
  107. matchstr 2  11 "CONNECT 1200\13\10"
  108. matchstr 3  12 "CONNECT 2400\13\10"
  109. matchstr 4  13 "CONNECT 4800\13\10"
  110. matchstr 5  14 "CONNECT 9600\13\10"
  111. matchstr 6  15 "CONNECT 19200\13\10"
  112. matchstr 7  50 "NO CARRIER\13\10"
  113. matchstr 8  50 "ERROR\13\10"
  114. matchstr 9  52 "NO DIALTONE\13\10"
  115. matchstr 10 53 "BUSY\13\10"
  116. matchstr 11 54 "NO ANSWER\13\10"
  117. matchread 700
  118. jump 31
  119. !
  120. @LABEL 32
  121. userhook 1
  122. note "Answering phone…" 2
  123. jump 31
  124. !
  125. ! 50: error messages
  126. !
  127. @LABEL 50
  128. exit -6021
  129. !
  130. @LABEL 52
  131. exit -6020
  132. !
  133. @LABEL 53
  134. exit -6022
  135. !
  136. @LABEL 54
  137. exit -6023
  138. !
  139. @LABEL 59
  140. exit -6019
  141. !
  142. ! Hang up the modem
  143. !
  144. @HANGUP
  145. @LABEL 60
  146. settries 0
  147. @LABEL 61
  148. write "ATH0\13"
  149. matchclr
  150. matchstr 1 64 "OK\13\10"
  151. matchstr 2 63 "NO CARRIER\13\10"
  152. matchstr 3 64 "ERROR\13\10"
  153. matchread 15
  154. inctries
  155. iftries 3 64
  156. ! no response, try escape sequence
  157. write "+++"
  158. matchclr
  159. matchstr 1 62 "OK\13\10"
  160. matchread 18
  161. ! No response from modem, send modem reset command
  162. !
  163. write "ATZ\13\10"
  164. pause 10
  165.  
  166. jump 61
  167. !
  168. @LABEL 62
  169. matchclr
  170. matchstr 1 64 "OK\13\10"
  171. matchstr 2 63 "NO CARRIER\13\10"
  172. write "ATH0\13"
  173. matchread 50
  174. jump 61
  175. !
  176. @LABEL 63
  177. pause 45
  178. flush
  179. !
  180. ! Recall the factory settings
  181. !
  182. @LABEL 64
  183. matchclr
  184. matchstr 1 65 "OK\13\10"
  185. write "AT&F\13"
  186. matchread 30
  187. !
  188. @LABEL 65
  189. matchstr 1 66 "OK\13\10"
  190. write "ATS0=0\13"
  191. matchread 30
  192. !
  193. @LABEL 66
  194. exit 0
  195.